package cn.itcast.bos.service;

import cn.itcast.bos.domain.page.PageBean;
import cn.itcast.bos.domain.take_delivery.Promotion;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import javax.ws.rs.*;
import java.util.Date;

/**
 * Created by Think on 2017/9/24.
 */
public interface PromotionService  {

    public void save(Promotion model);

    public Page<Promotion> findPageData(Pageable pageable);

    // WebService方法，获取宣传活动数据
    @Path("/findPageData")
    @GET
    @Consumes({ "application/xml", "application/json" })
    @Produces({ "application/xml", "application/json" })
    public PageBean<Promotion> findPageData(@QueryParam("page") Integer page,
                                            @QueryParam("rows") Integer rows);

    // WebService方法，获取宣传活动详情
    @Path("/findById/{id}")
    @GET
    @Consumes({ "application/xml", "application/json" })
    @Produces({ "application/xml", "application/json" })
    public Promotion findById(@PathParam("id") Integer id);


    void updateStatus(Date date);
}
